package com.homework.test3;

public class Demo3 {
    public static double area(double x,double y){

        double mj = x*y;
        return mj;
    }
    public static double area(float x,double y){

        double mj = x*x*y;
        return mj;
    }

    public static void main(String[] args) {
        double c1 = 2.5;
        double c2 = 2.0;
        double cfx = area(c1, c2);

        float r = 3.0f;
        double yuan = area(r, 3.14);

        System.out.println("长方形的面积: " + cfx);
        System.out.println("圆的面积" + yuan);
    }
}
